const express = require('express') //导入express
const app = express() //创建web服务器


app.get('/user', (req, res) => {
    console.log(req.query);
    res.send({ name: 'zzl', age: 30, gender: '男' })
})
app.post('/user', (req, res) => {
    console.log(req.query);
    res.send('请求成功')
})
app.get('/', (req, res) => {
    console.log(req.query);
    res.send(req.query)
})


app.listen(80, () => {
    //启动web服务器
    console.log('express at http://127.0.0.1');
})